package com.netease.l.b;

import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.content.res.Resources;
import android.widget.RemoteViews;
import com.netease.l.a.a;
import com.netease.pris.a.f;
import com.netease.pris.a.q;
import com.netease.pris.activity.LoginActivity;
import com.netease.pris.activity.OfflineDownloadError;
import com.netease.pris.activity.PRISActivityOffline;
import com.netease.pris.activity.PRISActivitySetting;
import com.netease.pris.activity.SystemPushMessageActivity;
import com.netease.pris.app.PrisApp;
import com.netease.pris.atom.PRISNotification.PrisMessage;
import com.netease.pris.offline.ProcessResult;

public class d
{
  public static final int a = 256;
  public static final int b = 257;
  public static final int c = 1022;
  public static final int d = 1023;
  public static final int e = 1024;
  public static final int f = 1025;

  public static void a()
  {
    Intent localIntent = PRISActivitySetting.a(PrisApp.a());
    PendingIntent localPendingIntent = PendingIntent.getActivity(PrisApp.a(), 0, localIntent, 0);
    Notification localNotification = new Notification();
    localNotification.icon = 2130837670;
    localNotification.flags = 16;
    PrisApp localPrisApp = PrisApp.a();
    String str = c.a(2131362228);
    Object[] arrayOfObject = new Object[1];
    arrayOfObject[0] = f.a(PrisApp.a(), 3145728L);
    localNotification.setLatestEventInfo(localPrisApp, str, c.a(2131362229, arrayOfObject), localPendingIntent);
    ((NotificationManager)PrisApp.a().getSystemService("notification")).notify(1024, localNotification);
  }

  public static void a(int paramInt)
  {
    String str1 = PrisApp.a().getResources().getString(2131362320);
    Resources localResources = PrisApp.a().getResources();
    Object[] arrayOfObject = new Object[1];
    arrayOfObject[0] = Integer.valueOf(paramInt);
    String str2 = localResources.getString(2131362318, arrayOfObject);
    Intent localIntent = OfflineDownloadError.a(PrisApp.a(), paramInt);
    localIntent.setFlags(268435456);
    a(str1, str2, localIntent, 1025);
  }

  public static void a(int paramInt, ProcessResult paramProcessResult)
  {
    Notification localNotification = new Notification();
    localNotification.icon = 2130837668;
    localNotification.flags = (0x10 | localNotification.flags);
    PendingIntent localPendingIntent = PendingIntent.getActivity(PrisApp.a(), 0, b(paramInt, paramProcessResult), 134217728);
    localNotification.setLatestEventInfo(PrisApp.a(), c.a(2131362188), c.a(2131362193), localPendingIntent);
    ((NotificationManager)PrisApp.a().getSystemService("notification")).notify(1022, localNotification);
  }

  public static void a(Context paramContext, int paramInt)
  {
    String str = paramContext.getResources().getString(2131361883);
    Intent localIntent = new Intent(paramContext, LoginActivity.class);
    localIntent.setAction("user");
    localIntent.addFlags(335544320);
    localIntent.putExtra("from", 6);
    NotificationManager localNotificationManager = (NotificationManager)paramContext.getSystemService("notification");
    Notification localNotification = new Notification(2130837671, str, System.currentTimeMillis());
    localNotification.defaults = 3;
    localNotification.flags = 16;
    PendingIntent localPendingIntent = PendingIntent.getActivity(paramContext, 0, localIntent, 134217728);
    localNotification.setLatestEventInfo(paramContext, paramContext.getResources().getString(2131361792), str, localPendingIntent);
    localNotificationManager.notify(paramInt, localNotification);
  }

  public static void a(PRISNotification.PrisMessage paramPrisMessage)
  {
    Intent localIntent = SystemPushMessageActivity.a(PrisApp.a(), paramPrisMessage);
    PendingIntent localPendingIntent = PendingIntent.getActivity(PrisApp.a(), 0, localIntent, 0);
    Notification localNotification = new Notification();
    localNotification.icon = 2130837670;
    localNotification.flags = 16;
    localNotification.setLatestEventInfo(PrisApp.a(), paramPrisMessage.a(), paramPrisMessage.c(), localPendingIntent);
    ((NotificationManager)PrisApp.a().getSystemService("notification")).notify(257, localNotification);
  }

  public static void a(ProcessResult paramProcessResult)
  {
    Notification localNotification = new Notification();
    localNotification.icon = 2130837668;
    localNotification.flags = (0x10 | localNotification.flags);
    PendingIntent localPendingIntent = PendingIntent.getActivity(PrisApp.a(), 0, b(0, paramProcessResult), 134217728);
    localNotification.setLatestEventInfo(PrisApp.a(), c.a(2131362188), c.a(2131362189), localPendingIntent);
    ((NotificationManager)PrisApp.a().getSystemService("notification")).notify(1022, localNotification);
  }

  private static void a(String paramString1, String paramString2, Intent paramIntent, int paramInt)
  {
    Notification localNotification = new Notification();
    localNotification.icon = 2130837668;
    localNotification.flags = (0x10 | localNotification.flags);
    PendingIntent localPendingIntent = PendingIntent.getActivity(PrisApp.a(), 0, paramIntent, 134217728);
    localNotification.icon = 2130837668;
    PrisApp localPrisApp = PrisApp.a();
    if (paramString1 != null)
      if (paramString2 == null)
        break label95;
    while (true)
    {
      localNotification.setLatestEventInfo(localPrisApp, paramString1, paramString2, localPendingIntent);
      ((NotificationManager)PrisApp.a().getSystemService("notification")).notify(paramInt, localNotification);
      return;
      paramString1 = null;
      break;
      label95: paramString2 = null;
    }
  }

  public static Intent b(int paramInt, ProcessResult paramProcessResult)
  {
    Intent localIntent = new Intent(PrisApp.a(), PRISActivityOffline.class);
    localIntent.addFlags(268435456);
    localIntent.putExtra("extra_result", paramProcessResult);
    localIntent.putExtra("extra_status", paramInt);
    return localIntent;
  }

  public static void b()
  {
    String str1 = PrisApp.a().getResources().getString(2131362316);
    String str2 = PrisApp.a().getResources().getString(2131362317);
    Intent localIntent = OfflineDownloadError.a(PrisApp.a());
    localIntent.setFlags(268435456);
    a(str1, str2, localIntent, 1022);
  }

  public static void b(Context paramContext, int paramInt)
  {
    if (paramContext == null);
    while (true)
    {
      return;
      NotificationManager localNotificationManager = (NotificationManager)paramContext.getSystemService("notification");
      if (localNotificationManager == null)
        continue;
      localNotificationManager.cancel(paramInt);
    }
  }

  public static void b(ProcessResult paramProcessResult)
  {
    Notification localNotification = new Notification();
    localNotification.icon = 2130837668;
    localNotification.flags = (0x10 | localNotification.flags);
    PendingIntent localPendingIntent = PendingIntent.getActivity(PrisApp.a(), 0, b(7, paramProcessResult), 134217728);
    PrisApp localPrisApp = PrisApp.a();
    String str = c.a(2131362190);
    Object[] arrayOfObject = new Object[2];
    arrayOfObject[0] = Integer.valueOf(paramProcessResult.d());
    arrayOfObject[1] = f.a(PrisApp.a(), paramProcessResult.g());
    localNotification.setLatestEventInfo(localPrisApp, str, c.a(2131362132, arrayOfObject), localPendingIntent);
    ((NotificationManager)PrisApp.a().getSystemService("notification")).notify(1022, localNotification);
  }

  public static void c(ProcessResult paramProcessResult)
  {
    Notification localNotification = new Notification();
    localNotification.icon = 2130837668;
    localNotification.flags = (0x2 | localNotification.flags);
    int i = q.a();
    int j = 2130903069;
    if (i >= 11)
      j = 2130903070;
    RemoteViews localRemoteViews = new RemoteViews(PrisApp.a().getPackageName(), j);
    Object[] arrayOfObject1 = new Object[1];
    arrayOfObject1[0] = a.a(paramProcessResult.h());
    localRemoteViews.setTextViewText(2131558492, c.a(2131362192, arrayOfObject1));
    Object[] arrayOfObject2 = new Object[2];
    arrayOfObject2[0] = Integer.valueOf(paramProcessResult.f());
    arrayOfObject2[1] = Integer.valueOf(paramProcessResult.e());
    localRemoteViews.setTextViewText(2131558493, c.a(2131362305, arrayOfObject2));
    localRemoteViews.setProgressBar(2131558494, paramProcessResult.b(), paramProcessResult.a(), false);
    localRemoteViews.setTextViewText(2131558491, paramProcessResult.c());
    localRemoteViews.setImageViewResource(2131558490, 2130837668);
    localNotification.contentView = localRemoteViews;
    Intent localIntent = b(1, paramProcessResult);
    localNotification.contentIntent = PendingIntent.getActivity(PrisApp.a(), 0, localIntent, 134217728);
    ((NotificationManager)PrisApp.a().getSystemService("notification")).notify(1022, localNotification);
  }

  public static void d(ProcessResult paramProcessResult)
  {
    Notification localNotification = new Notification();
    localNotification.icon = 2130837668;
    localNotification.flags = (0x10 | localNotification.flags);
    Intent localIntent = new Intent(PrisApp.a(), PRISActivityOffline.class);
    localIntent.setFlags(268435456);
    localIntent.putExtra("extra_result", paramProcessResult);
    localIntent.putExtra("extra_status", 1);
    PendingIntent localPendingIntent = PendingIntent.getActivity(PrisApp.a(), 0, localIntent, 0);
    localNotification.setLatestEventInfo(PrisApp.a(), c.a(2131362194), c.a(2131362195) + f.a(PrisApp.a(), 3145728L), localPendingIntent);
    ((NotificationManager)PrisApp.a().getSystemService("notification")).notify(1023, localNotification);
  }
}

/* Location:           D:\android\hack\dex2jar-0.0.9.8\classes_dex2jar.jar
 * Qualified Name:     com.netease.l.b.d
 * JD-Core Version:    0.6.0
 */